package com.hairline.controller;

import com.hairline.bean.vo.BaseRespVo;
import com.hairline.service.ServiceConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class ConfigController {
    @Autowired
    ServiceConfig serviceConfig;

    @RequestMapping("admin/config/mall")
    public BaseRespVo mall(){
        Map map = serviceConfig.getMall();
        return BaseRespVo.ok(map);
    }

    @RequestMapping("admin/config/express")
    public BaseRespVo express(){
        Map map = serviceConfig.getExpress();
        return BaseRespVo.ok(map);
    }

    @RequestMapping("admin/config/order")
    public BaseRespVo order(){
        Map map = serviceConfig.getOrder();
        return BaseRespVo.ok(map);
    }

    @RequestMapping("admin/config/wx")
    public BaseRespVo wx(){
        Map map = serviceConfig.getWX();
        return BaseRespVo.ok(map);
    }
}
